/*
** Exception handling stuff on Win32. Code is in debug.cpp
*/

// These can be redefined for portability...
#define DUMP_REGISTER(exc_struct, regname, regid) Msg(""regname"=0x%p\n",ExceptionRegister(exc_struct,regid));

#define ExceptionStruct EXCEPTION_POINTERS*
#define ExceptionCode(exc_struct) exc_struct->ExceptionRecord->ExceptionCode 
#define ExceptionPC(exc_struct) exc_struct->ExceptionRecord->ExceptionAddress
#define ExceptionRegister(exc_struct, reg) exc_struct->ContextRecord->reg

#define REGISTER_EAX Eax
#define REGISTER_EBX Ebx
#define REGISTER_ECX Ecx
#define REGISTER_EDX Edx
#define REGISTER_ESI Esi
#define REGISTER_EDI Edi
#define REGISTER_EBP Ebp
#define REGISTER_ESP Esp

#define REGISTER_RAX Rax
#define REGISTER_RBX Rbx
#define REGISTER_RCX Rcx
#define REGISTER_RDX Rdx
#define REGISTER_RSI Rsi
#define REGISTER_RDI Rdi
#define REGISTER_RBP Rbp
#define REGISTER_RSP Rsp
#define REGISTER_R8  R8
#define REGISTER_R9  R9
#define REGISTER_R10 R10
#define REGISTER_R11 R11
#define REGISTER_R12 R12
#define REGISTER_R13 R13
#define REGISTER_R14 R14
#define REGISTER_R15 R15





int Exception(ExceptionStruct exc);
